﻿<%@ Control Language="C#" AutoEventWireup="true" CodeFile="VoteView.ascx.cs" Inherits="controls_admin_VoteView" %>
<script type="text/javascript">
    function add() {
        window.location.replace(window.location.pathname + "?module=voteadd");
    }
    function edit() {
        window.location.replace(window.location.pathname + "?module=voteedit");
    }
</script>
<!-- table -->
<div class="box">
    <!-- box / title -->
    <div class="title">
        <h5>
            Thăm dò ý kiến</h5>
    </div>
    <div id="divMessage" runat="server">
    </div>
    <!-- end box / title -->
    <div style="width: 400px; margin: 20px">
        <div id="divQues" runat="server" style="margin: 10px" />
        <div>
            <a href="#" id="edit" onclick="edit();" style="margin: 0 10px 0 10px">
                <img src="../Resources/icons/16x16/edit.png" alt="Chỉnh sửa" title="Chỉnh sửa" />
            </a><a href="#" id="add" onclick="add();">
                <img src="../Resources/icons/16x16/plus.png" alt="Thêm mới" title="Thêm mới" />
            </a>
        </div>
    </div>
    <div class="table">
        <table>
            <asp:Repeater ID="rptVote" runat="server">
                <HeaderTemplate>
                    <thead>
                        <tr>
                            <th>
                                STT
                            </th>
                            <th class="left">
                                Phương án trả lời
                            </th>
                            <th>
                                Số lần được chọn
                            </th>
                            <th class="last">
                                Phần trăm
                            </th>
                        </tr>
                    </thead>
                    <tbody>
                </HeaderTemplate>
                <ItemTemplate>
                    <tr>
                        <td align="center">
                            <%#Container.ItemIndex+1%>
                        </td>
                        <td>
                            <%#Eval("ANSWER")%>
                        </td>
                        <td align="center">
                            <%#Eval("NUMBER")%>
                        </td>
                        <td class="last" align="center">
                            <%#Eval("RATE")%>
                        </td>
                    </tr>
                </ItemTemplate>
                <FooterTemplate>
                    </tbody>
                </FooterTemplate>
            </asp:Repeater>
        </table>
    </div>
</div>
<!-- end table -->
